from flask import Blueprint, jsonify
from models.notice import Notice

bp = Blueprint('notices', __name__)


@bp.route('/notices', methods=['GET'])
def get_notices():
    notices = Notice.query.all()
    return jsonify([n.to_dict() for n in notices])
